package com.suzhiliang.springbootlesson.loggerInterceptor;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Copyright (C), 2015-2018, XXX有限公司
 *
 * @ClassName: LoggerEntity
 * @Author: xmm
 * @Date: 2018/10/24 11:24
 * @Description: 日志拦截器实体类
 * @Version 1.0
 */
@Entity
@Table(name = "t_logger_infos")
public class LoggerEntity implements Serializable {

    private static final long serialVersionUID = 3754538969039889151L;

    @Id
    @Column(name = "log_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long logId;

    @Column(name = "log_client_ip")
    private String logClientIp;

    @Column(name = "log_uri")
    private String logUri;

    @Column(name = "log_type")
    private String logType;

    @Column(name = "log_method")
    private String logMethod;

    @Column(name = "log_param_data")
    private String logParamData;

    @Column(name = "log_session_id")
    private String logSessionId;

    @Column(name = "log_time",insertable = false)
    private Timestamp logTime;

    @Column(name = "log_return_time")
    private String logReturnTime;

    @Column(name = "log_return_data")
    private String logReturnData;

    @Column(name = "log_http_status_code")
    private String logHttpStatusCode;

    @Column(name = "log_time_consuming")
    private Long logTimeConsuming;

    public Long getLogId() {
        return logId;
    }

    public void setLogId(Long logId) {
        this.logId = logId;
    }

    public String getLogClientIp() {
        return logClientIp;
    }

    public void setLogClientIp(String logClientIp) {
        this.logClientIp = logClientIp;
    }

    public String getLogUri() {
        return logUri;
    }

    public void setLogUri(String logUri) {
        this.logUri = logUri;
    }

    public String getLogType() {
        return logType;
    }

    public void setLogType(String logType) {
        this.logType = logType;
    }

    public String getLogMethod() {
        return logMethod;
    }

    public void setLogMethod(String logMethod) {
        this.logMethod = logMethod;
    }

    public String getLogParamData() {
        return logParamData;
    }

    public void setLogParamData(String logParamData) {
        this.logParamData = logParamData;
    }

    public String getLogSessionId() {
        return logSessionId;
    }

    public void setLogSessionId(String logSessionId) {
        this.logSessionId = logSessionId;
    }

    public Timestamp getLogTime() {
        return logTime;
    }

    public void setLogTime(Timestamp logTime) {
        this.logTime = logTime;
    }

    public String getLogReturnTime() {
        return logReturnTime;
    }

    public void setLogReturnTime(String logReturnTime) {
        this.logReturnTime = logReturnTime;
    }

    public String getLogReturnData() {
        return logReturnData;
    }

    public void setLogReturnData(String logReturnData) {
        this.logReturnData = logReturnData;
    }

    public String getLogHttpStatusCode() {
        return logHttpStatusCode;
    }

    public void setLogHttpStatusCode(String logHttpStatusCode) {
        this.logHttpStatusCode = logHttpStatusCode;
    }

    public Long getLogTimeConsuming() {
        return logTimeConsuming;
    }

    public void setLogTimeConsuming(Long logTimeConsuming) {
        this.logTimeConsuming = logTimeConsuming;
    }
}
